package com.cyz.common.exception;

import com.cyz.common.enums.MyEnums;

/**
 * 自定义异常类型
 */
public class MyException extends RuntimeException{

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public MyException(MyEnums myEnums) {
        super(myEnums.getMsg());
        this.code = myEnums.getCode();
        this.msg = myEnums.getMsg();
    }

}
